#ifndef _GCAPP
#define _GCAPP

#include "Gorbatras_Library.h"

#ifndef DllExport
#define DllExport __declspec(dllexport)
#endif

namespace GC
{
	class ConverterSettings;	

	//The converter application
	class ConverterApp
	{
		public:  
			enum ConverterType
			{
				Fbx = 0
			};
			enum Status
			{
				Success = 0,
				Failed = 1,
				Crashed = 2
			};			
			
			DllExport ConverterApp(const _TCHAR* a_inputFile, const _TCHAR* a_outputFile, const ConverterType a_converterType);
			DllExport ConverterApp(const _TCHAR* a_inputFile, const _TCHAR* a_outputFile, const ConverterType a_converterType, ConverterSettings* a_settings);
			DllExport ~ConverterApp();	

			DllExport const int RunConverter(boost::function<void( const wchar_t* a_message, const bool a_newLine)> a_logMessage);	

			static const ConverterSettingsPtr ConverterApp::GetSettings();
		
			static void ConverterApp::LogMessage(const wchar_t* a_message,const bool a_newLine = true)
			{
				if (s_logMessage != NULL)
				{
					s_logMessage(a_message, a_newLine);
				}				
			};

		private:	
			static ConverterSettingsPtr s_settings;
			static boost::function<void(const wchar_t*, const bool)> s_logMessage;
			//The converter interface
			iConverterPtr m_converter;
			//If converter is succesfully initiated
			bool m_initiated;

			void Initialize(const _TCHAR* a_inputFile, const _TCHAR* a_outputFile, const ConverterType a_converterType);
	};
		
}

#endif